﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace nxt
{
    public partial class DeviceInfo : Form
    {
        private int batteryInfo;
        private string[] deviceInfo;
        private int batteryInfo2;
        private string[] deviceInfo2;

        public DeviceInfo(int batteryInfo_, string [] deviceInfo_,int batteryInfo2_, string [] deviceInfo2_)
        {
            InitializeComponent();
            this.batteryInfo = batteryInfo_;
            this.deviceInfo = deviceInfo_;
            this.batteryInfo2 = batteryInfo2_;
            this.deviceInfo2 = deviceInfo2_;

            if (batteryInfo == 0)
            {
                label2.Text = "n/a";
            }
            else
            {
                label2.Text = Convert.ToString(batteryInfo);
            }
            if (deviceInfo[0] == null)
            {
                label4.Text = "n/a";
            }
            else
            {
                label4.Text = deviceInfo[0];
            }
            if (deviceInfo[1] == null)
            {
                label6.Text = "n/a";
            }
            else
            {
                label6.Text = deviceInfo[1];
            }
            if (deviceInfo[2] == null)
            {
                label8.Text = "n/a";
            }
            else
            {
                label8.Text = deviceInfo[2];
            }
            if (deviceInfo[3] == null)
            {
                label10.Text = "n/a";
            }
            else
            {
                label10.Text = deviceInfo[3];
            }
            if (batteryInfo2 == 0)
            {
                label16.Text = "n/a";
            }
            else
            {
                label16.Text = Convert.ToString(batteryInfo2);
            }
            if (deviceInfo2[0] == null)
            {
                label17.Text = "n/a";
            }
            else
            {
                label17.Text = deviceInfo2[0];
            }
            if (deviceInfo2[1] == null)
            {
                label18.Text = "n/a";
            }
            else
            {
                label18.Text = deviceInfo2[1];
            }
            if (deviceInfo2[2] == null)
            {
                label19.Text = "n/a";
            }
            else
            {
                label19.Text = deviceInfo2[2];
            }
            if (deviceInfo2[3] == null)
            {
                label20.Text = "n/a";
            }
            else
            {
                label20.Text = deviceInfo2[3];
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
